
<include file="mobile/Public/header" />

<link rel="stylesheet" href="__CSS__/detail_font.css">
<link rel="stylesheet" href="__CSS__/makeorder.css">
<link rel="stylesheet" href="__CSS__/good.css">
<style>
    .status-section{padding: 0.834rem;}
    .detail-title{line-height: 1.7;}
    .delivery-section{padding-right: 2rem}
    .delivery-status{color: #359A2B}
    .detail-footer.btn-footer{text-align: right;padding-right: 0.834rem}
    .remark-input{padding-left: 7rem}
    .paystyle-select{padding-left: 12rem; color: #333333;border: none;outline: none}
    .paystyle{position: absolute; top: -5.5rem;width: 100%}
    .good-section-img {height: auto; width: 48%; }
    .good-section-left{position:inherit;}
</style>
<header class="color-main vertical-box">
    <span class="header-title">一键找布详情</span>
    <div class="header-left vertical-box">
        <img class="img-btn" src="__IMG__/back.png" onclick="window.location.href='{:U('shop/index/quick_order_list')}'">
    </div>
    <div class="header-right vertical-box">
        <img class="img-btn" src="__IMG__/home.png" onclick="window.location.href='{:U('shop/index/index')}'">
    </div>
</header>
<php>
$status_data = array(
    '1' => array(
        'title' => '待确认'
    ),
    '2' => array(
        'title' => '已确认'
    ),
    '3' => array(
        'title' => '已取消'
    )
)
</php>
<article class="btn-footer-margin">
    <section class="status-section color-main">
        <p class="big-text detail-title"><php> if(!empty($quick_order['status'])) echo $status_data[$quick_order['status']]['title'] </php></p>
        <p class="small-text white-tips-font">采购类型：<span><php> if($quick_order['typeid'] == 1) echo '找面料' </php></span></p>
        <p class="small-text white-tips-font">采购数量：<span><php> echo $quick_order['quantity'] </php>米</span></p>
    </section>


    <section class="good-info-section tips-font last-liner-section margin-bottom">
        <div>
            <p>订单号：<php> if(!empty($quick_order['id'])) echo $quick_order['id'] </php></p>
            <p>联系方式：<php> if(!empty($quick_order['connection'])) echo $quick_order['connection'] </php></p>
            <p>下单时间：<php> if(!empty($quick_order['create_time'])) echo date('Y-m-d H:i:s',$quick_order['create_time']) </php></p>
            <php> if(!empty($quick_order['check_time'])){ </php>
            <p>确认时间：<php> if(!empty($quick_order['check_time'])) echo date('Y-m-d H:i:s',$quick_order['check_time']) </php></p>
            <php>}</php>
        </div>
    </section>

    <section class="good-info-section tips-font last-liner-section margin-bottom">
        <div>
            <p>规格和要求：<php> if(!empty($quick_order['content'])) echo $quick_order['content'] </php></p>

        </div>
    </section>

    <section class="good-section linear-section">
        <div class="good-section-left">
        <php>foreach($quick_order['images'] as $row){</php>
            <img class="good-section-img" src="<php> echo $row </php>">
        <php>}</php>
        </div>
    </section>
</article>
<footer class="btn-group detail-footer btn-footer border-box">

    <php>
    if($quick_order['status']==1){</php>
        <button data-id="<php>echo $quick_order['id']</php>" class=".cancel-order-btn color-disable">取消</button>
    <php>}</php>

</footer>

<include file="mobile/Public/footer" />

<script>
    //'jquery' or 'zepto' 脚本入口,按情况选择加载
    seajs.use(['jquery','zepto'], function () {
        $(document).ready(function () {
            $('.btn-group').on('click','button',function () {
                var id = $(this).data('id');
                if(confirm('您确定要取消吗？')){
                    $.post('{:U('shop/index/quick_order_list/')}',{id:id}, function (ret) {
                        if(ret.status==1){
                            alert('取消成功！');
                            window.location.reload();
                        }
                    })
                }
            });
        })
    });
</script>
</body>
</html>